#pragma once
#include"AbstractBox2DTest.h"

class DemoApplyTorque :public AbstractBox2DTest
{
public:
	createScene(DemoApplyTorque)

	CREATE_FUNC(DemoApplyTorque)

	bool init();

	virtual void box2DAppReady() override;

	void work(float dt);
private:
	void limitAngularVelocity(b2Body* body, float speedMax);

	b2Body* boss;
	b2Body* ground;
	const float TORQUE_BOSS = 80;
	const float ASPEED_LIMIT_BOSS = 5 * 3.14 * 32 / 180;
	float bossTorque = 0;
};